#!/usr/bin/expect
##

set username deepin
set password 112234
set timeout 3

spawn passwd $username
 expect {
  "*New password:*" { send "$password\r";exp_continue;}
  "*Retype new password:" { send "$password\r";exp_continue;}
 }
#interact
